import Vue from 'vue'
import Router from 'vue-router'
/*import HelloWorld from '@/components/HelloWorld'*/

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
        path: '*',
        component: (resolve) => require(['../views/error404.vue'], resolve)
    },
    {
        path: '/',
        meta: {
            title: '数据资源管理'
        },
        component: (resolve) => require(['../views/index.vue'], resolve)
    },
    {
        path: '/base',
        meta: {
            title: 'base',
            requiresAuth: true
        },
        component: (resolve) => require(['../views/base/base.vue'], resolve),
        children: [
            {
                path: 'welcome',
                name: 'welcome',
                component: (resolve) => require(['../views/sys/welcome.vue'], resolve),
                meta: {
                    title:"welcome"
                }
            },
            {
                path: 'user',
                name: 'user',
                component: (resolve) => require(['../views/sys/user.vue'], resolve),
                meta: {
                    title:"用户管理"
                }
            },
            {
                path: 'menu',
                name: 'menu',
                component: (resolve) => require(['../views/sys/menu.vue'], resolve),
                meta: {
                    title:"菜单管理"
                }
            },
            {
                path: 'role',
                name: 'role',
                component: (resolve) => require(['../views/sys/role.vue'], resolve),
                meta: {
                    title:"角色管理"
                }
            },
            {
                path: 'resultAnalytic',
                name: 'resultAnalytic',
                component: (resolve) => require(['../views/manage/resultAnalytic.vue'], resolve),
                meta: {
                    title:"统计分析"
                }
            },
            {
                path: 'course',
                name: 'course',
                component: (resolve) => require(['../views/manage/course.vue'], resolve),
                meta: {
                    title:"课程管理"
                }
            },
            {
                path: 'student',
                name: 'student',
                component: (resolve) => require(['../views/manage/student.vue'], resolve),
                meta: {
                    title:"学生管理"
                }
            },
            {
                path: 'score',
                name: 'score',
                component: (resolve) => require(['../views/manage/score.vue'], resolve),
                meta: {
                    title:"成绩管理"
                }
            },
            {
                path: 'class',
                name: 'class',
                component: (resolve) => require(['../views/manage/class.vue'], resolve),
                meta: {
                    title:"班级管理"
                }
            },
            {
                path: 'test6',
                name: 'test6',
                component: (resolve) => require(['../views/test/test6.vue'], resolve),
                meta: {
                    title:"参数管理"
                }
            }
        ]
    }
  ]
})
